/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const warehouseRouter = {
  path: '/warehouse',
  component: Layout,
  name: '库存',
  meta: {
    title: '库存',
    subtitle:'库存',
    icon: 'stock'
  },

  children: [
    // 模拟三级路由
    {
      path: '',
      component: Layout,
      name: '业务',
      meta: { title: '业务', subtitle: '日常', icon: 'menu_warehouse'},
      childrens: [
        {
          path: '/allocate/list',
          meta: {title: '调拨单', subtitle:'调拨',icon: 'menu_order',permissions:['allocate.query']}
        },
        {
          path: '/check/list',
          meta: {title: '盘点单' ,subtitle:'盘点',icon:'menu_material',permissions:['check.query']}
        },
        {
          path: '/borrow/list',
          meta: {title: '领用单' ,subtitle:'领用',icon:'menu_material',permissions:['borrow.query']}
        },
      ]
    },
    {
      path: '',
      component: Layout,
      name: '查询',
      meta: { title: '查询', subtitle: '查询', icon: 'menu_warehouse'},
      childrens: [
        {
          path: '/stock/list',
          meta: {title: '商品库存查询' ,subtitle:'库存',icon:'menu_material',permissions:['warehouse.query'],color:'true'}
        },
        {
          path: '/emptyBarrelAudit/list',
          meta: {title: '空桶库存查询' ,subtitle:'空桶',icon:'menu_material',permissions:['emptyBarrel.query']}
        },

      ]
    },
    {
      path: '',
      component: Layout,
      name: '报表',
      meta: { title: '报表', subtitle: '报表', icon: 'menu_warehouse'},
      childrens: [
        {
          path: '/inStockCountReport/list',
          meta: { title: '入库汇总表',subtitle:'入库', icon: 'menu_report',permissions:['inStockCountReport.query']},
        },
        {
          path: '/warehouseSaleReport/list',
          meta: { title: '出库汇总表',subtitle:'出库', icon: 'menu_report',permissions:['warehouseSaleReport.query']}
        },

        {
          path: '/allocateReport/list',
          meta: { title: '调拨汇总表',subtitle:'调拨', icon: 'menu_report',permissions:['allocateReport.query']}
        },
        {
          path: '/checkCountReport/list',
          meta: { title: '损益汇总表',subtitle:'损益', icon: 'menu_report',permissions:['checkCountReport.query']}
        },
        {
          path: '/emptyBarrelReport/list',
          meta: { title: '空桶汇总表',subtitle:'空桶', icon: 'menu_report',permissions:['emptyBarrelReport.query']}
        },
        {
          path: '/inSaleCountReport/list',
          meta: { title: '进出存汇总表',subtitle:'进出存', icon: 'menu_report',permissions:['saleFlowCountReport.query'],color:'true'}
        },
       ]
    },




    // 注册路由
    {
      path: '/purchasein/list',
      component: () => import('@/views/purchasein/list'),
      name: 'purchasein-list',
      meta: { title: '采购入库',subtitle:'入库', icon: 'menu_order',permissions:['purchasein.query']},
      hidden: true
    },
    {
      path: '/purchasein/view',
      component: () => import('@/views/purchasein/view'),
      name: 'purchasein-view',
      meta: { title: '采购入库详情', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/saleout/list',
      component: () => import('@/views/saleout/list'),
      name: 'saleout-list',
      meta: { title: '销售出库', subtitle:'出库',icon: 'menu_material', permissions: ['saleout.query'] },
      hidden: true
    },
    {
      path: '/saleout/add',
      component: () => import('@/views/saleout/add'),
      name: 'saleout-add',
      meta: { title: '新增出库单', icon: 'menu_material' },
      hidden: true
    },
    {
      path: '/saleout/edit',
      component: () => import('@/views/saleout/edit'),
      name: 'saleout-edit',
      meta: { title: '修改出库单', icon: 'menu_material' },
      hidden: true
    },
    {
      path: '/saleout/view',
      component: () => import('@/views/saleout/view'),
      name: 'saleout-view',
      meta: { title: '销售出库单详情', icon: 'menu_material' },
      hidden: true
    },
    {
      path: '/allocate/list',
      component: () => import('@/views/allocate/list'),
      name: 'allocate-list',
      meta: { title: '调拨单', subtitle:'调拨',icon: 'menu_order',permissions:['allocate.query']},
      hidden: true
    },
    {
      path: '/allocate/add',
      component: () => import('@/views/allocate/add'),
      name: 'allocate-add',
      meta: { title: '新增调拨', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/allocate/edit',
      component: () => import('@/views/allocate/edit'),
      name: 'allocate-edit',
      meta: { title: '修改调拨', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/allocate/view',
      component: () => import('@/views/allocate/view'),
      name: 'allocate-view',
      meta: { title: '调拨详情', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/check/list',
      component: () => import('@/views/check/list'),
      name: 'check-list',
      meta: {title: '盘点单' ,subtitle:'盘点',icon:'menu_material',permissions:['check.query']},
      hidden: true
    },
    {
      path: '/check/add',
      component: () => import('@/views/check/add'),
      name: 'check-add',
      meta: { title: '新增库存盘点', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/check/view',
      component: () => import('@/views/check/view'),
      name: 'check-view',
      meta: { title: '盘点详情', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/check/edit',
      component: () => import('@/views/check/edit'),
      name: 'check-edit',
      meta: { title: '修改库存盘点', icon: 'menu_order' },
      hidden: true
    },
     {
      path: '/emptyBarrelAudit/list',
      component: () => import('@/views/emptyBarrelAudit/list'),
      name: 'emptyBarrelAudit-list',
      meta: {title: '空桶库存查询' ,subtitle:'空桶',icon:'menu_material',permissions:['emptyBarrel.query']},
      hidden: true
    },
    {
      path: '/emptyBarrelAudit/summaryList',
      component: () => import('@/views/emptyBarrelAudit/summaryLst'),
      name: 'summaryList',
      meta: {title: '空桶明细表' ,icon:'menu_material'},
      hidden: true
    },
    {
      path: '/stock/list',
      component: () => import('@/views/stock/list'),
      name: 'stock-list',
      meta: {title: '商品库存查询' ,subtitle:'库存',icon:'menu_material',permissions:['warehouse.query']},
      hidden: true
    },
    {
      path: '/inStockCountReport/list',
      component: () => import('@/views/inStockCountReport/list'),
      name: 'inStockCountReport-list',
      meta: { title: '入库汇总表',subtitle:'入库', icon: 'menu_report',permissions:['inStockCountReport.query']},
      hidden: true
    },
    {
      path: '/inStockCountReport/inStockCountReportdetails',
      component: () => import('@/views/inStockCountReport/inStockCountReportdetails'),
      name: 'inStockCountReport-inStockCountReportdetails',
      meta: { title: '入库明细表',subtitle:'详情', icon: 'menu_report',},
      hidden: true
    },
    {
      path: '/warehouseSaleReport/list',
      component: () => import('@/views/warehouseSaleReport/list'),
      name: 'warehouseSaleReport-list',
      meta: { title: '出库汇总表',subtitle:'出库', icon: 'menu_report',permissions:['warehouseSaleReport.query']},
      hidden: true
    },
    {
      path: '/warehouseSaleReport/detailed',
      component: () => import('@/views/warehouseSaleReport/detailed'),
      name: 'warehouseSaleReport-detailed',
      meta: { title: '出库明细表',subtitle:'详情', icon: 'menu_report',},
      hidden: true
    },
    {
      path: '/allocateReport/list',
      component: () => import('@/views/allocateReport/list'),
      name: 'allocateReport-list',
      meta: { title: '调拨汇总表',subtitle:'调拨', icon: 'menu_report',permissions:['allocateReport.query']},
      hidden: true
    },
    {
      path: '/allocateReport/allocateReportdetails',
      component: () => import('@/views/allocateReport/allocateReportdetails'),
      name: 'allocateReport-allocateReportdetails',
      meta: { title: '调拨明细表',subtitle:'详情', icon: 'menu_report',},
      hidden: true
    },
    {
      path: '/checkCountReport/list',
      component: () => import('@/views/checkCountReport/list'),
      name: 'checkCountReport-list',
      meta: { title: '盘点汇总表',subtitle:'损益', icon: 'menu_report',permissions:['checkCountReport.query']},
      hidden: true
    },
    {
      path: '/checkCountReport/checkCountReportdetails',
      component: () => import('@/views/checkCountReport/checkCountReportdetails'),
      name: 'checkCountReport-checkCountReportdetails',
      meta: { title: '盘点明细表',subtitle:'详情', icon: 'menu_report',},
      hidden: true
    },
    {
      path: '/emptyBarrelReport/list',
      component: () => import('@/views/emptyBarrelReport/list'),
      name: 'emptyBarrelReport-list',
      meta: { title: '空桶汇总表',subtitle:'空桶', icon: 'menu_report',permissions:['emptyBarrelReport.query']},
      hidden: true
    },
    {
      path: '/saleFlowCountReport/list',
      component: () => import('@/views/saleFlowReport/list'),
      name: 'saleFlowCountReport-list',
      meta: { title: '进出存明细表',subtitle:'进出存', icon: 'menu_report'},
      hidden: true
    },
    {
      path: '/inSaleCountReport/list',
      component: () => import('@/views/inSaleCountReport/list'),
      name: 'inSaleCountReport-list',
      meta: { title: '进出存汇总表',subtitle:'进出存', icon: 'menu_report'},
      hidden: true
    },
    {
      path: '/purchaseout/list',
      component: () => import('@/views/purchaseout/list'),
      name: 'purchaseout-list',
      meta: { title: '采购退货', subtitle:'退货',icon: 'menu_order',permissions:['purchaseout.query']},
      hidden: true
    },
    {
      path: '/purchaseout/view',
      component: () => import('@/views/purchaseout/view'),
      name: 'purchaseout-view',
      meta: { title: '采购退货详情', icon: 'menu_order' },
      hidden: true
    },
    {
      path: '/salein/list',
      component: () => import('@/views/salein/list'),
      name: 'salein-list',
      meta: { title: '销售退货', subtitle:'退货',icon: 'menu_material', permissions: ['salein.query'] },
      hidden: true
    },
    {
      path: '/salein/add',
      component: () => import('@/views/salein/add'),
      name: 'salein-add',
      meta: { title: '新增退货单', icon: 'menu_material' },
      hidden: true
    },
    {
      path: '/salein/edit',
      component: () => import('@/views/salein/edit'),
      name: 'salein-edit',
      meta: { title: '修改退货单', icon: 'menu_material' },
      hidden: true
    },
    {
      path: '/salein/view',
      component: () => import('@/views/salein/view'),
      name: 'salein-view',
      noCache: true,
      meta: { title: '退货单详情', icon: 'menu_material' },
      hidden: true
    },
    {
      path: '/inStockCountReport/list',
      component: () => import('@/views/inStockCountReport/list'),
      name: 'inStockCountReport-list',
      meta: { title: '进货汇总表',subtitle:'进货', icon: 'menu_report',permissions:['inStockCountReport.query']},
      hidden: true
    },
    {
      path: '/inStockCountReport/inStockCountReportdetails',
      component: () => import('@/views/inStockCountReport/inStockCountReportdetails'),
      name: 'inStockCountReport-inStockCountReportdetails',
      meta: { title: '进货明细表',subtitle:'详情', icon: 'menu_report',},
      hidden: true
    },


    {
      path: '/borrow/list',
      component: () => import('@/views/borrow/list'),
      name: 'borrow-list',
      meta: { title: '领用单',subtitle:'领用', icon: 'menu_order',},
      hidden: true
    },
    {
      path: '/borrow/add',
      component: () => import('@/views/borrow/add'),
      name: 'borrow-add',
      meta: { title: '领用单新增',subtitle:'领用单新增', icon: 'menu_order',},
      hidden: true
    },
    {
      path: '/borrow/edit',
      component: () => import('@/views/borrow/edit'),
      name: 'borrow-edit',
      meta: { title: '领用单编辑',subtitle:'领用单编辑', icon: 'menu_order',},
      hidden: true
    },
    {
      path: '/borrow/view',
      component: () => import('@/views/borrow/view'),
      name: 'borrow-view',
      meta: { title: '领用单详情',subtitle:'领用单详情', icon: 'menu_order',},
      hidden: true
    },
  ]
}
export default warehouseRouter
